package com.vinjun.timerwheel;

import java.util.concurrent.TimeUnit;

/**
 * Created by 000376 on 2018/1/13.
 */
public class Main implements TimerTask{
    final static Timer timer = new TimerWheel();


    public static void main(String[] args) {
        TimerTask timerTask = new Main();
        for (int i = 0; i < 10; i++) {
            timer.newTimeout(timerTask, 5, TimeUnit.SECONDS, "" + i );
        }
    }
    @Override
    public void run(Timeout timeout, String argv) throws Exception {
        System.out.println("timeout, argv = " + argv );
    }
}
